package com.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.dao.IBisPathSwhDao;
import com.model.Bis_path;
import com.model.Bis_path_swh;
import com.model.Bis_path_swhId;

@Repository
public class BisPathSwhHibernateDao extends
		GenericHibernateDao<Bis_path_swh, Bis_path_swhId> implements
		IBisPathSwhDao {

	public List<Bis_path_swh> getPathSwh(Bis_path fr_bis_path, String swh_type) {
		List<Bis_path_swh> bis_path_swhList = new ArrayList<Bis_path_swh>();

		String sqlGetPathSwh = "FROM Bis_path_swh WHERE id.fr_path_id_fk='"
				+ fr_bis_path.getId().getPath_id_fk()
				+ "' AND id.fr_path_ver_fk='"
				+ fr_bis_path.getId().getPath_ver_fk()
				+ "' AND id.fr_ope_no_fk='"
				+ fr_bis_path.getId().getCr_ope_no() + "' AND id.swh_typ='"
				+ swh_type + "'";
		bis_path_swhList = this.find(sqlGetPathSwh);

		return bis_path_swhList;
	}

}
